package top.onedream.buildsmallsoftware.service.impl

import org.springframework.stereotype.Service
import top.onedream.buildsmallsoftware.model.user.Role
import top.onedream.buildsmallsoftware.repo.RoleRepository
import top.onedream.buildsmallsoftware.service.RoleService

@Service
class RoleServiceImpl(
    private val roleRepository: RoleRepository
) : RoleService {

    override fun createRole(roleName: String): Long? =
        roleRepository.save(Role(roleName = roleName)).id


}